# 进行搜索
from selenium.webdriver.common.by import By

from web_po.package.basedriver import BaseDriver
from web_po.package.search_package import SearchPackage

# 继承浏览器操作

# 主页
class MainPackage(BaseDriver):
    def goto_search(self):
        # 点击搜索按钮
        self.find_and_click(By.ID, "search-button")
        # 点击详细搜索
        # self.find_and_click(By.XPATH, "//*[@class='fa d-icon d-icon-sliders-h svg-icon svg-node']")
        self.find_and_click(By.XPATH, "//*[@class='searching']")
        # 跳转到搜索页面
        return SearchPackage(self._driver)
